<?php
namespace app\index\controller;

use app\common\ext\IDb;
use app\common\ext\IRequest;
use think\Controller;

class Download extends Controller {

    /**
     * @功能：下载app
     * @开发者：cxl
     */
    public function app(){
        $app = input('code');
        switch ($app){
            case 'youdu':
                $download_url = 'http://kurong-static.oss-cn-shanghai.aliyuncs.com/apk/youdu1.0.0.apk';
                break;
            case 'huoke':
                $download_url = 'http://kurong-static.oss-cn-shanghai.aliyuncs.com/apk/huoke1.0.0.apk';
                break;
            case 'hezuo':
                $download_url = 'http://kurong-static.oss-cn-shanghai.aliyuncs.com/apk/hezuo1.0.0.apk';
                break;
            default:
                return '';
        }

        $this->redirect($download_url);
    }
}
